package com.day11.test2_jdk8_date_zhuanhuan;

import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;

/**
 * @author 小坡
 * @date 2022/9/14  15:51
 **/
public class TestJdk8Date {
    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.of(2022, 12, 12, 1, 1, 1);
        LocalDate localDate = localDateTime.toLocalDate();
//        转换成为一个    LocalDate   对象
        System.out.println(localDate);//2022-12-12

        LocalTime localTime = localDateTime.toLocalTime();
//        转换成为一个   LocalTime   对象
        System.out.println(localTime);   //01:01:01
    }
}
